package com.example.demo.controller;


import com.example.demo.model.result;
import com.example.demo.services.teacherService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/teacherAll")
public class teacherController {


    @Autowired
    private teacherService teacherService;


    private Logger logger= LoggerFactory.getLogger(getClass());


    @GetMapping("/update")
    public result update(String name,String city,Integer id){
        logger.info("老师正在更改信息,职工编号{}",id);
        return result.success(teacherService.updateTeacher(name, city, id));
    }


}
